//
//  SEGMarketListViewModel.h
//  Commom
//
//  Created by 梁学彰 on 2020/6/9.
//

#import <Foundation/Foundation.h>
#import "ReactiveObjC.h"
#import "SEGCommunitySocialManager.h"
#import "SEGSHManager.h"                        //集市manager

NS_ASSUME_NONNULL_BEGIN

@interface SEGMarketListViewModel : NSObject
@property (nonatomic, strong) SEGSHManager *sHManager;
@property (nonatomic, strong) SEGCommunitySocialManager* socialManager;
/**
 当前请求的分页
 */
@property (nonatomic, assign) NSInteger page;

/**
 当前选中cell
 */
@property (nonatomic, strong)NSIndexPath *selectedIndexPath;

/**
 上一次的最后数据条数
 */
@property (nonatomic, assign) NSInteger lastSectionIndex;

/*
 广告类型
 */
@property (nonatomic, assign) SEGAdvlistType positionType;

/*
 当前选中的集市类型 默认为全部
 */
@property (nonatomic, copy) NSString *marketType;


- (RACSignal *)loadMarketTypeList;

- (RACSignal *)seg_requestMarketList;

- (RACSignal *)loadAdvlist;

- (void)loadPublishMarketType;

- (RACSignal *)shareVCActionButtonPressedWithType:(SEGShareVCActionType)actionType;

- (NSDictionary *)getCellMoreButtonActionParamsWithIndexPath:(NSIndexPath *)indexPath;

#pragma mark - 独立部分
@property (nonatomic, assign) NSInteger marketIndex;
/** 范围 1：本社区 3：全平台(默认全平台) */
@property (nonatomic, copy) NSString *scopeType;
@property (nonatomic, copy) NSString *scopeDesc;
/** 是否正在点赞(防止重复调用点赞接口) */
@property (nonatomic, assign) BOOL isLiking;

- (RACSignal *)loadHLBMarketTypeList;
- (RACSignal *)seg_requestHLBMarketList;
- (RACSignal *)requesPublishScopeList;
- (RACSignal *)hlb_cellPraiseButtonActionWithIndexPath:(NSIndexPath *)indexPath;
- (RACSignal *)refreshListViewWithIndex:(NSIndexPath *)indexPath objId:(NSString *)objId objType:(NSString *)objType isDelete:(BOOL)isDelete;
@end

NS_ASSUME_NONNULL_END
